import request from '@/utils/request'
// -------------专家认证------------

let BASE_ADDRESS = 'work/expert'

//分页查询
export const getExpertListApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: 'get',
        params
    })
}

// id查询 专家认证信息
export const getExpertInfoApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/getInfo?id=${params}`,
        method: 'get',
    })
}

//获取专家职称列表
export const getExpertOfficeListApi = (params) => {
    return request({
        url: `/base/expertOffice/list`,
        method: 'get',
        params
    })
}

// 添加专家类型职称
export const AddExpertOfficeApi = (data) => {
    return request({
        url: `/base/expertOffice/add`,
        method: 'post',
        data
    })
}
// 删除专家类型职称
export const DeleltExpertOfficeApi = (data) => {
    return request({
        url: `/base/expertOffice/remove`,
        method: 'delete',
        data
       
    })
}

// 修改专家类型职称
export const EditExpertOfficeApi = (data) => {
    return request({
        url: `/base/expertOffice/edit`,
        method: 'put',
        data
    })
}

// 新增专家类型职称
export const addExpertOfficeApi = (data) => {
    return request({
        url: `/assess/userLevel/add`,
        method: 'post',
        data
    })
}


//获取专家等级列表
export const getUserLevelListApi = () => {
    return request({
        url: `/assess/userLevel/list`,
        method: 'get',
    })
}

//获取咨询类别的数据
export const getConsultTypeListApi = (params) => {
    return request({
        url: `/work/consultType/list`,
        method: 'get',
        params
    })
}

//专家审核通知模板获取
export const getMessageTempListApi = (params) => {
    return request({
        url: `/base/messageTemp/list`,
        method: 'get',
        params
    })
}


//专家证书查询获取
export const getexpertCertificateListApi = (params) => {
    return request({
        url: `/base/expertCertificate/list`,
        method: 'get',
        params

    })
}
// export const getexpertCertificateListApi = (params) => {
//     return request({
//         url: `/base/expertCertificate/list?officeId=${params}`,
//         method: 'get',
//     })
// }
//新增证书查询获取
export const addexpertCertificateListApi = (data) => {
    return request({
        url: `/base/expertCertificate/add`,
        method: 'post',
        data


    })
}

//修改证书查询获取
export const EditexpertCertificateListApi = (data) => {
    return request({
        url: `/base/expertCertificate/edit`,
        method: 'put',
        data


    })
}
//删除证书查询获取
export const deleteexpertCertificateListApi = (data) => {
    return request({
        url: `/base/expertCertificate/remove`,
        method: 'delete',
        data
    })
}

//专家认证新增
export const AddExpertcertification = (data) => {
    return request({
        url: `base/expertCertificate/add`,
        method: 'post',
        data
    })
}

//专家认证的提交
export const getExpertEditApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: 'put',
        data
    })
}
//获取审核意见
export const getopinionListApi = (params) => {
    return request({
        url: `base/messageTemp/list`,
        method: 'get',
        params
    })
}
//修改审核意见
export const getopinioneditListApi = (data) => {
    return request({
        url: `base/messageTemp/edit`,
        method: 'put',
        data
    })
}
//审核意见新增

export const addopinionListApi = (data) => {
    return request({
        url: `base/messageTemp/add`,
        method: 'post',
        data
    })
}
//审核意见删除
export const deleteopinionListApi = (params) => {
    return request({
        url: `base/messageTemp/remove/${params}`,
        method: 'delete',
    })
}

//获取专家等级
export const getExpertlevelListApi = (params) => {
    return request({
        url: `/assess/userLevel/list`,
        method: 'get',
        params
    })
}

//新增专家登记模板
export const addExpertlevelListApi = (data) => {
    return request({
        url: `/assess/userLevel/add`,
        method: 'post',
        data
    })
}
//专家等级删除
export const deletExpertlevelListApi = (params) => {
    return request({
        url: `/assess/userLevel/remove/${params}`,
        method: 'delete',
    })
}
//修改审核意见
export const userLevelListApi = (data) => {
    return request({
        url: `/assess/userLevel/edit`,
        method: 'put',
        data
    })
}

//编辑任务规则
export const getExpertExpertRosterApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/expertRoster`,
        method: 'get',
        params
    })
}

// 修改专家认证页面的擅长领域
export const editExpertUpdateFieldApi = (data) => {
    return request({
        url: `/work/expert/updateField`,
        method: 'put',
        data
    })
}

//修改专家的信息 审核成功后的 /work/expert/updateExpert
export const editUpdateExpertApi = (data) =>{
    return request({
        url: `/work/expert/updateExpert`,
        method: 'put',
        data
    })
}